package com.wang.action;

import com.wang.entity.TbUserTask;
import com.wang.response.ResultResponse;
import com.wang.service.TbUserTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/task")
public class TbUserTaskUserAction {
     @Autowired
     private TbUserTaskService tbUserTaskService;

    /**
   * 添加任务
   */
     @RequestMapping("/insertTbUserTask")
   private  ResultResponse insertTbUserTask(@RequestBody TbUserTask tbUserTask){
      return tbUserTaskService.insertTbUserTask(tbUserTask);
    }
    /*
     删除任务
     */
    @PostMapping("removeTbUserTask/{userTaskId}")
   private ResultResponse removeTbUserTask(@PathVariable Integer  userTaskId){
       return tbUserTaskService.removeTbUserTask(userTaskId);
    }
    /*
    查看任务
     */
    @PostMapping("findtbtask")
    private ResultResponse findtbtask(@RequestBody TbUserTask tbUserTask){
        return tbUserTaskService.findtbtask(tbUserTask);
    }
}
